package com.hewanglan.auth.common.enums;

import lombok.Getter;

@Getter
public enum AuthUserStatusEnum {
    OPEN (0,"启用"),
    CLOSE(1,"禁用");

    public int code;
    public String desc;

    AuthUserStatusEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static AuthUserStatusEnum getByCode(int codeVal)
    {
        for(AuthUserStatusEnum authUserStatusEnum: AuthUserStatusEnum.values())
        {
            if(authUserStatusEnum.code==codeVal)
            {
                return authUserStatusEnum;
            }
        }
        return null;
    }
}
